package com.cdfahe.gms.aop;

import java.lang.reflect.Method;

import net.sf.cglib.proxy.InvocationHandler;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class CheckPermissonAspect implements InvocationHandler{
	
//	@Pointcut(value="execution(* com.cdfahe.gms.web.controller.*.*(..)) ")
	@Pointcut(value="execution(* com.cdfahe.testaop.*.*(..)) ")
	public void beforePointCut(){}
	
	@Before("beforePointCut()")
	public void before(){
		System.out.println("前置通知1");
	}

	@Override
	public Object invoke(Object proxy, Method method, Object[] args)
			throws Throwable {
		
		System.out.println("Welcome"); 
		System.out.println("Welcome"); 
		System.out.println("Welcome"); 
		return null;
	}
	
}
